<?php
if(!defined('INEZCMS')){
	exit('Access Denied');
}
if(empty($userlogininfo)){
    
    jump(SITEURL."/login.html", '您还没有登录!');
}
$ezuser=$ezhand->select("member","*","id=".$userlogininfo["uid"]);

$do=$_GET['do']?$_GET['do']:'fav';


$pagesize=20;
no_cache();    
$do=$_GET['do']?$_GET['do']:'in';
$page = !($_GET['page'])?'1':intval($_GET['page']);
$page2=($page-1)*$pagesize;
  
if($do=='fav'){

    $total = $ezhand->count('favorite',"userid='".$ezuser["id"]."'");
	$mylist=$ezhand->select_all('favorite',"*","userid='".$ezuser["id"]."' order by id desc limit $page2,$pagesize");    
    
}elseif($do=="delfav"){
    $fid=intval($_GET["fid"]);
    $ezhand->delete("favorite"," userid='".$ezuser["id"]."' and id=".$fid);
    jump(u('user','mylist',array('do'=>'fav')), '此收藏已经移除!');
}elseif($do=="pl"){
    
    $total = $ezhand->count('thread t,comment_data c',"  t.id=c.tid and t.status=99 and userid=".$ezuser["id"]);
    $commentlist=$ezhand->select_all('thread t,comment_data c',"t.id,t.title,c.content,c.creat_at",' t.id=c.tid and t.status=99 and userid='.$ezuser["id"].'  order by c.id desc  limit 0,2');
    
    
    
}elseif($do=="qus"){
    
    $total = $ezhand->count('callback',"userid='".$ezuser["id"]."'");
	$mylist=$ezhand->select_all('callback',"*","userid='".$ezuser["id"]."' order by id desc limit $page2,$pagesize");    
}

?>